//
//  XiaoBianMoreTableViewCell.m
//  瓜子电台
//
//  Created by lanou on 16/8/6.
//  Copyright © 2016年 YueZhang. All rights reserved.
//

#import "XiaoBianMoreTableViewCell.h"

@implementation XiaoBianMoreTableViewCell

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)setDataWithModel:(XiaoBianMoreModel *)model
{
    [self.pic sd_setImageWithURL:[NSURL URLWithString:model.coverMiddle] placeholderImage:[UIImage imageNamed:@"picPlaceHolder"]];
    [[self.pic layer] setShadowOffset:CGSizeMake(5, 5)];
    [[self.pic layer] setShadowRadius:2];
    [[self.pic layer] setShadowOpacity:0.5];
    [[self.pic layer] setShadowColor:[UIColor blackColor].CGColor];
    self.title.text = model.title;
    self.intro.text = model.intro;
    float a = (CGFloat)model.playsCounts / 10000;
    char buf[10];
    sprintf(buf, "%.1f", a);
    sscanf(buf, "%f", &a);
    NSString *str = [NSString stringWithFormat:@"%s万", buf];
    
    self.playCount.text = str;
    self.num.text = [NSString stringWithFormat:@"%ld", model.tracks];
}


@end
